package com.ty.cloudpicture.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ty.cloudpicture.model.dto.space.SpaceAddRequest;
import com.ty.cloudpicture.model.dto.space.SpaceQueryRequest;
import com.ty.cloudpicture.model.entity.Picture;
import com.ty.cloudpicture.model.entity.Space;
import com.ty.cloudpicture.model.entity.User;
import com.ty.cloudpicture.model.vo.PictureVO;
import com.ty.cloudpicture.model.vo.SpaceVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author ong char
* @description 针对表【space(空间)】的数据库操作Service
* @createDate 2025-02-26 16:30:37
*/
public interface SpaceService extends IService<Space> {
    long createSpace(SpaceAddRequest spaceAddRequest, User loginUser);

    void validSpace(Space space,boolean add);

    void fillSpaceBySpaceLevel(Space space);

    /**
     * 获取查询对象
     *
     * @param spaceQueryRequest
     * @return
     */
    QueryWrapper<Space> getQueryWrapper(SpaceQueryRequest spaceQueryRequest);

    SpaceVO getSpaceVO(Space space, HttpServletRequest request);

    Page<SpaceVO> getSpaceVOPage(Page<Space> spacePage);

    void checkSpaceAuth( User loginUser,Space space);
}
